#ifndef AUDIO_H
#define AUDIO_H

#include <QObject>
#include <QAudioInput>
#include <QFile>
#include <QAudioDeviceInfo>
#include <QMessageBox>

class audio : public QObject
{
    Q_OBJECT
public:
    explicit audio(QObject *parent = nullptr);
    void startRecord(QString filename);   //开始录音
    void stopRecord();                    //停止录音
    ~audio();
signals:
public slots:

private:
    QAudioInput *m_audioInput;           //录音对象
    QFile       *m_file;                 //
};
#endif // AUDIO_H
